Ext.onReady(function() {
	var iconPath = '../images/silkIcons/';
	
	// create accordion
	var toolBoxAcc = new Ext.ux.Accordion('toolBoxAcc', {
	fitHeight: false
	})
	
	/*
	// create toolBoxPanelResources
	var toolBoxPanelResources = toolBoxAcc.add(new Ext.ux.InfoPanel('toolBoxPanelResources', {
			autoScroll: true,			
			icon: 'images/iconFolderStar.png',
			fixedHeight: 400
	}));
	*/
	
	// create toolBoxPanelBrowse
	var toolBoxPanelBrowse = toolBoxAcc.add(new Ext.ux.InfoPanel('toolBoxPanelBrowse', {
			autoScroll: true,
			icon: 'images/iconFolderExplore.png',
			fixedHeight: 400
	}));
	
	// create toolBoxPanelSearch
	var toolBoxPanelSearch = toolBoxAcc.add(new Ext.ux.InfoPanel('toolBoxPanelSearch', {icon: 'images/iconMagnifier.png'}));
		
	// File tree code
	// dataUrl: 'includes/createFileTree.php'
	var fileTree = new Ext.ux.FileTreePanel(toolBoxPanelBrowse.body, {
		animate: true
		, dataUrl: 'includes/filetree.php'
		, readOnly: false
		, containerScroll: true
		, enableDD: true
		, enableUpload: true
		, enableRename: true
		, enableDelete: true
		, enableNewDir: true
		, uploadPosition: 'menu'
		, method: 'post'
		, iconPath: 'http://www.nationaldb.org/admin/images/silkIcons/'
		, edit: true   
    	, sort: true
		, maxFileSize: 1048575
		, hrefPrefix: 'http://www.nationaldb.org/documents/'
		
	});
	
	var fileRoot = new Ext.tree.AsyncTreeNode({text:'Documents and Files', path:'', allowDrag:false});
	fileTree.setRootNode(fileRoot);
	fileTree.render();
	fileRoot.expand();

});
